<template>
	<view class="content">
		<u-navbar title="意见反馈" :autoBack="true" :bgColor="bgColor"></u-navbar>
		<text class="title">----感谢您对HealthBox伽瑞盒的支持！----</text>
		<textarea class="input" placeholder="请填写您需要反馈的问题丨Your Feedback" v-model="content" />
		<view class="nextBtn" @click="submit">
			提交
		</view>
	</view>
</template>

<script>
	import {
		baseURL,
		basePath
	} from '@/config/app'
	export default {
		data() {
			return {
				bgColor: 'transparent',
				baseUrl: `https://cdn.zkjialan.com/img/user/`,
				content: ''
			}
		},
		methods: {
			submit() {
				if (!this.content) {
					this.$toast({
						title: '请填写您需要反馈的问题'
					})
					return;
				}
				this.$request.post(`shopapi/Feedback/user_feedback`, {
					content: this.content,
				}).then(res => {
					this.$toast({
						title: res.data.msg
					})
					setTimeout(function() {
						uni.navigateBack({
							delta: 1
						});
					}, 1500)
				})
			}
		},
		computed: {},
		onLoad() {},
		onShow() {}
	}
</script>

<style lang="scss" scoped>
	.input {
		width: 640rpx;
		height: 622rpx;
		border-radius: 15rpx;
		margin-left: 25rpx;
		margin-top: 60rpx;
		background-color: #f6f6f6;
		padding: 30rpx;
	}

	.title {
		display: block;
		width: 100%;
		margin-top: 60rpx;
		font-size: 28rpx;
		font-family: 'am';
		text-align: center;
	}

	.nextBtn {
		position: relative;
		width: 600rpx;
		height: 90rpx;
		line-height: 90rpx;
		text-align: center;
		color: #fff;
		font-family: 'am';
		border-radius: 45rpx;
		margin-left: 76rpx;
		margin-top: 100rpx;
		margin-bottom: 100rpx;
		background-color: #f08229;
	}

	.content {
		position: fixed;
		width: 100%;
		height: 100vh;
		background-color: #fff;
		overflow-y: scroll;
	}

	page {
		width: 100%;
		height: 100vh;
		background-color: #fff;
		overflow-y: scroll;
	}
</style>